

public class ShapeTest {
    public static void main(String[] args) {
        //抽象类不能实例化对象
        //Shape s=new Shape() ;
        //Shape s1=new Shape("形状") ;
        //子类对象可以指向抽象类的引用 多态
        Shape s2= new Circle("形状",2);
        double area=s2.getArea();
        System.out.println("area："+area);

    }
}
